using SageKing.Studio.Contracts;
using SageKing.Designer.Core.Contracts;
using SageKing.Designer.Core.Interop;
using SageKing.Designer.Core.Services;
using Microsoft.Extensions.DependencyInjection;
using SageKing.Features.Contracts;
using SageKing.Designer.BlazorX6.DiagramDesigners.Fallback;
using SageKing.Designer.BlazorX6.DiagramDesigners.FC;

namespace SageKing.Designer.Core.Extensions;

public static class ServiceCollectionExtensions
{
    public static IServiceCollection AddDesignerBlazorX6(this IServiceCollection services)
    {
        return services
            .AddScoped<IDesignerFeature, Feature>()
            .AddScoped<IMapperFactory, MapperFactory>()
            .AddScoped<DesignerJsInterop>()
          .AddDiagramDesignerProvider<FallbackDesignerProvider>()
          .AddDiagramDesignerProvider<FlowchartDiagramDesignerProvider>();
    }
}